import { defineConfig, globalIgnores } from 'eslint/config';
import globals from "globals";
import js from "@eslint/js";
import pluginVue from 'eslint-plugin-vue'
import skipFormattingConfig from '@vue/eslint-config-prettier/skip-formatting';

export default defineConfig([
  globalIgnores([
    '**/.vscode',
    '**/dist',
    '**/package-lock.json',
    '**/pnpm-lock.yaml',
    '**/*.min.*',
  ]),
  { files: ["**/*.js"], languageOptions: { globals: globals.browser } },
  { files: ["**/*.js"], plugins: { js }, extends: ["js/recommended"] },
  ...pluginVue.configs['flat/essential'],
  ...pluginVue.configs['flat/recommended'],
  {
    rules: {
      'vue/multi-word-component-names': 'off',
      'vue/no-v-html': 'off',
      'vue/attribute-hyphenation': 'off',
      'vue/v-on-event-hyphenation': 'off',
      'vue/comment-directive': 'off',

    },
    languageOptions: {
      sourceType: 'module',
      node: true,
      globals: {
        ...globals.browser
      }
    }
  },
  skipFormattingConfig,

]);
